﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 设备运行模式记录。
/// </summary>
[SugarTable("equip_mode_record", "设备运行模式记录表")]
public sealed class EquipModeRecord : EntityBaseId
{
    /// <summary>
    /// 产线编号
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "产线编号", Length = 32)]
    public string? LineCode { get; set; }

    /// <summary>
    /// 产线名称
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "产线名称", Length = 32)]
    public string? LineName { get; set; }

    /// <summary>
    /// 警报设编号
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "设备编号", Length = 64)]
    public string? EquipCode { get; init; }

    /// <summary>
    /// 警报设备名称
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "设备名称", Length = 64)]
    public string? EquipName { get; init; }

    /// <summary>
    /// 设备运行模式
    /// </summary>
    public EquipRunningMode RunningMode { get; init; }

    /// <summary>
    /// 记录时间
    /// </summary>
    public DateTime RecordTime { get; init; }
}
